<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
	[#include "/admin/include/admin_static.htm"]
	[#import "/admin/include/admin_pagination.ftl" as p/]
    <script type="text/javascript">
        layui.use(['form','layer'], function(){
            var form = layui.form(), $=layui.jquery, layer = layui.layer;
            form.on('switch(switch)', function(data){
                console.log(data.elem.checked)
                if(data.elem.checked){
                    $('#status').val(1);
                }else{
                    $('#status').val(-1);
                }
            });
            //监听提交
            form.on('submit(success)', function(data){

                ajax({
                    url: '/admin/recharge/rechargeVerify.aspx',
                    type:"POST",
                    data: data.field,
                    dataType:"json",
                    success:function(result){
                        layer.msg(result.content,{time:500}, function(){
                            location.href='${path}/admin/recharge/list.aspx?status=1';
                        });
                    }
                });
                return false;
            });

        });
    </script>

</head>
<body>
	<div class="main_admin_content">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>充值详细记录</legend>
        </fieldset>
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">用户名:</label>
                <div class="layui-input-block">
                    <input type="text"  readonly autocomplete="off" value="${user.user_name }" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">真实姓名：</label>
                <div class="layui-input-block">
                    <input type="text"  readonly autocomplete="off" value="${(realName.real_name)!'' }" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">身份证号码：</label>
                <div class="layui-input-block">
                    <input type="text" readonly autocomplete="off" value="${(realName.id_number)!'' }" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                 <label class="layui-form-label">开户行:</label>
                 <div class="layui-input-block">
                    <input type="text"  readonly autocomplete="off" value="${(bankCard.bank)!'' }" class="layui-input">
                 </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">支行：</label>
                <div class="layui-input-block">
                    <input type="text" readonly autocomplete="off" value="${(bankCard.branch)!'' }" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">卡号：</label>
                <div class="layui-input-block">
                    <input type="text"  readonly autocomplete="off" value="${(bankCard.bank_cardno)!'' }" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">支付方式：</label>
                <div class="layui-input-block">
                    <input type="text"  readonly autocomplete="off" value="${(recharge.ap_name)!'' }/${(recharge.ap_description)!'' }" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">金额：</label>
                <div class="layui-input-block">
                    <input type="text" name="credited" readonly autocomplete="off" value="${(recharge.money)!'' }" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">是否同意</label>
                <div class="layui-input-block">
                     <input type="text" name="status" id="status" value="1" style="display: none">
                     <input type="checkbox" name="isagree" lay-skin="switch" lay-text="同意|拒绝" lay-filter="switch"  value="1" [#if recharge.status==0] checked="checked" [#else]  [#if recharge.status==1]checked="checked" disabled[#else] disabled [/#if]  [/#if]>
                </div>
             </div>
            <div class="layui-form-item">
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">审核备注</label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入备注" required lay-verify="required" class="layui-textarea" name="remark"></textarea>
                    </div>

                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button  lay-submit lay-filter="success" class="layui-btn " />确认充值</buttton>

                    <input name="rechargeId" type="hidden" value="${recharge.id }"/>

                </div>
            </div>
        </form>
        </div>


            <table class="layui-table">
                <colgroup>
                    <col width="50">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                    <col width="80">
                </colgroup>

                <thead>
                <tr>
                    <th>用户ID</th>
                    <th>用户名称</th>
                    <th>记录编号</th>
                    <th>记录类型</th>
                    <th>账户总额</th>
                    <th>操作金额</th>
                    <th>可用余额</th>
                    <th>冻结金额</th>
                    <th>待收金额</th>
                    <th>记录时间</th>
                    <th>记录备注</th>
                </tr>
                </thead>
			[#list logs as log]

                <tr>
                    <td>${log.user_id}</td>
                    <td>
					${log.userName }</td>
                    <td>${log.id }</td>
                    <td>${log.logName }</td>
                    <td>￥${(log.total+log.collection)!0}</td>
                    <td>￥${log.money}</td>
                    <td>￥${log.balance}</td>
                    <td>￥${log.freezing_amont}</td>
                    <td>￥${log.collection}</td>
                    <td>
					${p2p_date_format(log.addtime ,"yyyy-MM-dd HH:mm:ss")}
                    </td>
                    <td>${log.remark}</td>
                </tr>
			[/#list]

            </table>

	</div>

    </body>
</html>